<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../js/vue.js"></script>
    <script>
        Vue.config.ignoredElements=[
            "aaa",
            "bbb",
            /^icon-/
        ]
    </script>
</head>
<body>
    <div id="app">
        <h2>{{msg}}</h2>
        <hr>
        <hello></hello>
        <hello></hello>
        <hello></hello>
        <hr>
        <comp-a></comp-a>
        <icon-b>我也不是在跟你开玩笑</icon-b>
    </div>
    <div id="root">
        <hello>1111</hello>
        <aaa>sddsa</aaa>
        <bbb>sdafsd</bbb>
        <icon-a>sasa</icon-a>
    </div>
    <template id="hello">
        <div>
            <h1>{{msg}}</h1>
            <input type="text" v-model="msg">
        </div>
    </template>
</body>
<script>
    var hello=Vue.extend({
        template:"#hello",
        data(){
            return{
                msg:"你在教我做事啊"
            }
        }
    });
    Vue.component("hello",hello);
    Vue.component("compA",{
        template:`<h3>{{msg}}</h3>`,
        data(){
            return{
                msg:"你知道我不喜欢开玩笑"
            }
        }
    })
    new Vue({
        el:"#app",
        data:{
            msg:"在这种场面想唬我"
        }
    })
    new Vue({
        el:"#root"
    })
</script>
</html>